#ifndef _DEVICES_DELAY_H_
#define _DEVICES_DELAY_H_



/* SysTick Control / Status Register Definitions */
#define SysTick_CTLR_STRE_Msk       (1UL << 3U)     /*!< SysTick CTRL: COUNTFLAG Mask */
#define SysTick_CTLR_STCLK_Msk      (1UL << 2U)     /*!< SysTick CTRL: CLKSOURCE Mask(1:SYS、0:SYS/8) */
#define SysTick_CTLR_STIE_Msk       (1UL << 1U)     /*!< SysTick CTRL: TICKINT Mask */
#define SysTick_CTLR_STE_Msk        (1UL << 0U)     /*!< SysTick CTRL: ENABLE Mask */


/* 以下两类延时函数可以调用 */

/* 阻塞似延时 */
#define vDelayInit  vTimerDelayInit
#define vDelayS     vTimerDelayS
#define vDelayMs    vTimerDelayMs
#define vDelayUs    vTimerDelayUs

/* 非阻塞似延时 */
void vRtosDelayS(float fTime);
void vRtosDelayMs(float fTime);




/* 请勿调用以下函数 */
void vSysTickDelayInit(void);
void vSysTickDelayS(float fTime);
void vSysTickDelayMs(float fTime);
void vSysTickDelayUs(float fTime);

void vTimerDelayInit(void);
void vTimerDelayS(float fTime);
void vTimerDelayMs(float fTime);
void vTimerDelayUs(float fTime);


#endif
